package com.zyz.D_方法;

/**
 * @author: vick
 * @Date: 2025/3/13
 * @Description:
 * @version: 1.0
 */
public class Demo2 {
    public int add(int a, int b) {
        return a + b;
    }

    //参数类型不同
    public int add(double a, int b) {
        return (int) (a+b);
    }

    //参数顺序不同
    public int add(int a, double b) {
        return (int) (a+b);
    }

    //参数个数不同
    public int add(int a, int b, int c) {
        return a + b;
    }
}
